package cn.zs.supply.common.utils;


import com.itextpdf.text.Rectangle;
import com.itextpdf.text.pdf.PdfContentByte;
import com.itextpdf.text.pdf.PdfPCell;
import com.itextpdf.text.pdf.PdfPCellEvent;
import com.itextpdf.text.pdf.PdfPTable;

class CustomCell implements PdfPCellEvent {

	public void cellLayout(PdfPCell cell, Rectangle position,PdfContentByte[] canvases) {
		
		PdfContentByte cb = canvases[PdfPTable.LINECANVAS];
		cb.saveState();
		//cb.setLineCap(PdfContentByte.LINE_CAP_ROUND);
		//cb.setLineDash(0, 1, 1);
		cb.setLineWidth(0.5f);
		cb.setLineDash(new float[] { 5.0f, 5.0f }, 0);
		cb.moveTo(position.getLeft(), position.getBottom());
		cb.lineTo(position.getRight(), position.getBottom());
		cb.stroke();
		cb.restoreState();
	}
    public static void main(String[] args) {  
    	CustomCell custCell = new CustomCell();
    }  
    
}